/**
 * 
 */
package com.dsteiner.widgets.client.model;

import java.beans.PropertyChangeListener;
import java.util.List;

import com.dsteiner.widgets.client.PropertyChangeCollection;
import com.dsteiner.widgets.client.SuggestBoxWidget;
import com.dsteiner.widgets.client.SuggestBoxWidget.Suggestion;

public class SuggestBoxModel extends PrefilledTextBoxModel{

	private SuggestionModel choosenSuggestion;

	public SuggestionModel getChoosenSuggestion() {
		return choosenSuggestion;
	}

	public void setChoosenSuggestion(SuggestionModel choosenSuggestion) {
		SuggestionModel oldChoosenSuggestion = this.choosenSuggestion;
		this.choosenSuggestion = choosenSuggestion;
		propertyChangeSupport.firePropertyChange("choosenSuggestion", null, choosenSuggestion);
	}
	private SuggestionModel selectedSuggestion;

	public SuggestionModel getSelectedSuggestion() {
		return selectedSuggestion;
	}

	public void setSelectedSuggestion(SuggestionModel selectedSuggestion) {
		SuggestionModel oldSelectedSuggestion = this.selectedSuggestion;
		this.selectedSuggestion = selectedSuggestion;
		propertyChangeSupport.firePropertyChange("selectedSuggestion", oldSelectedSuggestion, selectedSuggestion);
	}
	private List<Suggestion> requestedSuggestions;

	public List<Suggestion> getRequestedSuggestions() {
		return requestedSuggestions;
	}

	public void setRequestedSuggestions(List<Suggestion> requestedSuggestions) {
		List<Suggestion> oldRequestedSuggestions = this.requestedSuggestions;
		this.requestedSuggestions = requestedSuggestions;
		propertyChangeSupport.firePropertyChange("requestedSuggestions", oldRequestedSuggestions, requestedSuggestions);
	}
	private String requestedText;

	public String getRequestedText() {
		return requestedText;
	}

	public void setRequestedText(String requestedText) {
		String oldRequestedText = this.requestedText;
		this.requestedText = requestedText;
		propertyChangeSupport.firePropertyChange("requestedText", oldRequestedText, requestedText);
	}
}